import request from '@/utils/request'
import Qs from 'qs'
// 代理商列表
export function list (params) {
  return request({
  params,
  url: '/back/adminEnt/getBackAgentList'
  })
  }

export function getBackAgentBox (params) {
    return request({
    params,
    url: '/back/adminEnt/getBackAgentBox'
    })
}


// 新增代理商
export function addBackAgent (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/adminEnt/addBackAgent',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}

//修改代理商信息
export function updateBackAgent (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/adminEnt/updateBackAgent',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}

//删除代理商
export function del (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/adminEnt/deleteBackAgent',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}

//修改代理商状态
export function updateBackAgentIsFlag (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/adminEnt/updateBackAgentIsFlag',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}


//重置密码
export function updateBackAgentPassword (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/adminEnt/updateBackAgentPassword',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}

